An application server provides software applications with services such as security, data services, transaction support, load balancing and management of large distributed systems. One type of application server is the Java® EE application server used to support the Java Platform, Enterprise Edition (Java® EE). The Java® EE application server can handle transactions, security, scalability, concurrency and management of the components that are deployed to it in order to enable developers to concentrate more on the business logic of the components rather than on infrastructure and integration tasks.
Customers using legacy applications, such as Common Business-Oriented Language (COBOL), may desire to re-host such applications within a Java® EE application server based upon the Java® Virtual Machine (JVM®) environment, where new developments are currently occurring thereby propelling the adaptation of new technologies by legacy applications by leveraging the features provided by the modern Java® EE application server environment.
One manner of legacy applications leveraging the features provided by the modern Java® EE application server environment is through the use of a “hybrid” application server, which may contain one or more Java® EE containers and one or more non-Java® containers. The hybrid application server allows hosting of applications written in multiple programming languages, such as Java® and COBOL. A “container” may refer to a data structure used for storing and executing applications. For example, a Java® EE container may be used for hosting Java® EE applications running on a JVM®; whereas, the non-Java® container may be used for hosting non-Java® applications, such as COBOL applications. The non-Java® container may also host applications written in non-Java® styles, such as Customer Information Control System (CICS), etc. One or more of the Java® EE applications within the Java® EE container may call the applications being hosted in the non-Java® container.
In some implementations, there may be several of these hybrid application servers that are combined to form a “cluster.” Requests to these clusters may be routed through routing agents, such as a reverse proxy server (e.g., Hypertext Transfer Protocol (HTTP) proxy server). A proxy server is a specific type of application server that acts as an intermediary for requests from clients seeking resources. One type of proxy server is a HTTP proxy server that routes HTTP requests to applications within the cluster of hybrid application servers that perform the work.
In such an implementation, the routing agent redirects the incoming requests to various hybrid application servers within the cluster based on a chosen routing algorithm. If a request is received by a Java® EE application (within the Java® EE container of the hybrid application server) that makes a call to a non-Java® application (within the non-Java® container of the hybrid application server), then it will be serviced by the non-Java® application.
Currently, the routing agent, such as a proxy server, only has knowledge of the availability of the Java® EE applications to service the requests by monitoring the JVM®s and sending only those requests to the Java® EE applications running on a JVM® that is operating. Once the JVM® becomes nonoperational, it will be marked as unavailable by the proxy server.
If, however, the non-Java® container of the hybrid application server within the cluster becomes unavailable, such as by a failure, the routing agent would have no knowledge of such an unavailability. Since the routing agent only has knowledge of the availability of the Java® EE applications, the routing agent will continue to send requests to the Java® EE applications (within the Java® EE container of the hybrid application server) that call the unavailable non-Java® applications within the unavailable non-Java® container. As a result, such requests would encounter errors and could not be serviced.
One manner of addressing such a situation is to have an object in the Java® EE container monitor the availability of the non-Java® container. When it becomes unavailable, the entire hybrid application server of the cluster will become deactivated. However, by deactivating the entire hybrid application server of the cluster, it prevents the routing agent from sending requests to those Java® EE applications within that hybrid application server that do not call the non-Java® applications within the unavailable non-Java® container thereby unnecessarily reducing the number of applications to service the requests which results in the inefficient use of the resources.